$(function () {
    $("#submitLogin").on("click", function (event) {
        var name = $("#login_name").val();
        var password = $("#login_password").val();
        $.ajax({
            url: '/adminc/login',
            data: {
                name: name,
                password: password
            },
            success: function (datas) {
                window.location.href = datas;
            }
        })
    })

    $('input[name=time]').datetimepicker({
        language: 'zh-CN',
        weekStart: 1,
        todayBtn: 1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        minView: 2,
        forceParse: 0
    });

    $("#beginSearch").on("click",function (event) {
        var searchBegin = $("#searchBegin").val();
        var searchEnd = $("#searchEnd").val();
        $.ajax({
            url:'/admin/getSaleDataWithBeginEnd/'+searchBegin+"/"+searchEnd,
            success:function (datas) {
                $("#totalInfo").html(datas);
            }
        })
    })




});